<?php /*
	EZ-Shop, Starter E-Commerce Platform
    Copyright (C) 2009  David Hinchliffe - FC Software Ltd

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/ ?>
<?php
$a="1";
$sql="select * from tblorders where intcustomerid!=0 and intcurrentorderstatus=1";
$res=$obj_db->select($sql);
$a=count($res);

$sql="select * from tblorders where intcustomerid!=0 and intcurrentorderstatus=2";
$res=$obj_db->select($sql);
$b=count($res);

$sql="select * from tblorders where intcustomerid!=0 and intcurrentorderstatus=3";
$res=$obj_db->select($sql);
$c=count($res);

$sql="select * from tblorders where intcustomerid!=0 and intcurrentorderstatus=4";
$res=$obj_db->select($sql);
$d=count($res);

$sql="select * from tblorders where intcustomerid!=0 and intcurrentorderstatus=5";
$res=$obj_db->select($sql);
$e=count($res);
?>
<script language="javascript">
var orderstatus;
var orderstatus1;
var orderstatus2;
var orderstatus3;
var orderstatus4;

orderstatus=<?php echo $a;?>;
orderstatus1=<?php echo $b;?>;
orderstatus2=<?php echo $c;?>;
orderstatus3=<?php echo $d;?>;
orderstatus4=<?php echo $e;?>;

</script>
<script language="JavaScript" src="js/mscript.js"></script>
<script language="JavaScript" src="js/mm_menu.js"></script>
<script language="JavaScript" src="js/overlib.js"></script>
<script language="JavaScript1.2">mmLoadMenus();</script>
<style type="text/css">
.style1 {
color: #FF0000;
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
font-weight:bold;
font-style:normal;
}

.style2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 18px;
}
</style>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="2">
  <tr class="seprtr">
    <td colspan="13" align="left">&nbsp;</td>
  </tr>
  <tr>
    <td colspan="13" align="left"><img src="images/logo.jpg" border="0"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="style2">&nbsp;&nbsp;[Admin Control Panel]</span></td>
  </tr>
  <tr class="seprtr">
    <td colspan="13" align="left">&nbsp;</td>
  </tr>
<?php
	if(isset($_SESSION['adminuserid'])) {
?> 
  <tr height="20" class="topbg">
    <td align="center"><a href="adminlogout.php" class="aa" onclick="return confirm('Do You want to logout?');">Logout</a></td>
    <td align="center"><a href="<?php echo 'admin.php';?>" class="aa">Admin Users</a></td>
    <td align="center"><a href="#" name="link4" class="aa"  id="link4" onMouseOver="MM_showMenu(window.mm_menu_0601121012_0,0,19,null,'link4')" onMouseOut="MM_startTimeout();"> Settings</a></td>
    <td align="center"><a href="#" name="link10" class="aa" id="link2" onMouseOver="MM_showMenu(window.mm_menu_0601125140_0,0,19,null,'link10')" onMouseOut="MM_startTimeout();"> Product </a></td>
    <td align="center"><a href="#" name="link5" class="aa" id="link5" onMouseOver="MM_showMenu(window.mm_menu_0601131633_0,0,19,null,'link5')" onMouseOut="MM_startTimeout();">Customers</a></td>
    <td align="center"><a href="#" name="link3" class="aa" id="link3" onMouseOver="MM_showMenu(window.mm_menu_0601130347_0,0,19,null,'link3')" onMouseOut="MM_startTimeout();">Payment Settings</a></td>
    <td align="center"><a href="#" name="link12" class="aa" id="link12" onMouseOver="MM_showMenu(window.mm_menu_0601131638_0,0,19,null,'link12')" onMouseOut="MM_startTimeout();">Orders</a></td>
    <td align="center"><a href="#" name="link6" class="aa" id="link9" onMouseOver="MM_showMenu(window.mm_menu_0601131636_0,0,19,null,'link6')" onMouseOut="MM_startTimeout();">Reports/Tools</a></td>
    <td align="center"><a href="#" name="link7" class="aa" id="link9" onMouseOver="MM_showMenu(window.mm_menu_0601131644_0,0,19,null,'link7')" onMouseOut="MM_startTimeout();">Emails</a></td>
  </tr>
<?php } ?> 
  
  <tr height="20">
    <td colspan="13" align="center"><span class="msg style1">
      <?php
  if(isset($_REQUEST['msg']))
  {
  echo $mess[$_REQUEST['msg']]; 
  }
  ?>
    </span></td>
  </tr>
</table>
